package com.sjzd.server.controller;

import com.sjzd.server.pojo.Admin;
import com.sjzd.server.pojo.RespBean;
import com.sjzd.server.service.IAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sys/chat")
public class ChatController {

    @Autowired
    private IAdminService adminService;

    @RequestMapping("/admins")
    public RespBean listAdmins(String keywords) {
        List<Admin> allAdmins = adminService.getAllAdmins(keywords);
        return RespBean.success("", allAdmins);
    }
}
